Replication archive for: Coppock, Alexander and Seth J. Hill and Lynn Vavreck. 2020. "The Small Effects of Political Advertising are Small Regardless of Context, Message, Sender, or Receiver: Evidence from 59 Real-time Randomized Experiments" Science Advances, forthcoming.


This replication archive contains the code and data necessary to reproduce the figures, tables, and in-text numerical results in both the main text and the replication archive.


To run these scripts, you'll need some additional packages for R, which you can install with:

install.packages(c("tidyverse", "estimatr", "texreg", "xtable", "rmeta", "metafor", "janitor"))


# Helper files

helpers.R - this file contains helper functions called by later scripts


# Data

ad_df.csv - Information about the advertisements
exps_with_incompletes.rds - a dataset that includes survey respondents who did and did not complete the survey for the attrition analysis.
exps.rds - dataset that compiles all 34000 survey responses


# Intermediate estimation

These R files....

estimate_favorability_cates.R
estimate_favorability_sates.R
estimate_vote_choice_cates.R
estimate_vote_choice_sates.R

...produce these .rds files that are used in the main text scripts and the supplementary materials scripts.

favorability_cates.rds
favorability_sates.rds
vote_choice_cates.rds
vote_choice_sates.rds

# Main text scripts

table_1.R
figure_1.R
figure_2.R
in_text_numbers.R

# Supplementary materials scripts

table_S1.R
table_S2.R
table_S3.R
figure_S1.R


# Session information

This replication archived worked on July 21, 2020 on a computer like this:

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] janitor_2.0.1   metafor_2.4-0   Matrix_1.2-18   rmeta_3.0       xtable_1.8-4    texreg_1.37.5  
 [7] estimatr_0.22.0 forcats_0.5.0   stringr_1.4.0   dplyr_1.0.0     purrr_0.3.4     readr_1.3.1    
[13] tidyr_1.1.0     tibble_3.0.3    ggplot2_3.3.2   tidyverse_1.3.0

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.0 haven_2.3.1      lattice_0.20-41  snakecase_0.11.0 colorspace_1.4-1 vctrs_0.3.2     
 [7] generics_0.0.2   blob_1.2.1       rlang_0.4.7      pillar_1.4.6     glue_1.4.1       withr_2.2.0     
[13] DBI_1.1.0        dbplyr_1.4.4     modelr_0.1.8     readxl_1.3.1     lifecycle_0.2.0  munsell_0.5.0   
[19] gtable_0.3.0     cellranger_1.1.0 rvest_0.3.5      fansi_0.4.1      broom_0.7.0      Rcpp_1.0.5      
[25] scales_1.1.1     backports_1.1.8  jsonlite_1.7.0   fs_1.4.2         hms_0.5.3        stringi_1.4.6   
[31] grid_4.0.2       cli_2.0.2        tools_4.0.2      magrittr_1.5     Formula_1.2-3    crayon_1.3.4    
[37] pkgconfig_2.0.3  ellipsis_0.3.1   xml2_1.3.2       reprex_0.3.0     lubridate_1.7.9  assertthat_0.2.1
[43] httr_1.4.2       rstudioapi_0.11  R6_2.4.1         nlme_3.1-148     compiler_4.0.2 


